using System;
using System.Collections.Generic;
using System.Text;

namespace GReporting.Core.PagingAlgorithm
{
    public class TitleBuilder : AbstractPageBuilder
    {
       public override void Build(PageBuilderContext context)
       {
           context.CurrentBand = context.Report.Layout.title;
           if (context.Report.Layout.isTitleNewPage&&context.PageNo==1)
           {
               context.NextPageSet();
               PrintBand(context);        
               context.NextPageSet();
           }
           else if (1 == context.PageNo)
           { 
               int printBandHeight= PrintBand(context);
               context.Y += printBandHeight;
               context.PrintHeight += printBandHeight;
           }
           AbstractPageBuilder builder = new ColumnHeaderBuilder();
           builder.Build(context);
       }
    }
}
